function [I] = Spindles(x)

L  = length(x);
n  = pow2(nextpow2(L));
Fs = 100;
dt = 1/Fs;
t = (0:L-1)/Fs;

y  = fft(x,n);
f  = (0:n-1)  *(Fs/n);
f2 = (1:n/2)*(Fs/n);
p  = y.*conj(y)/n;
p2 = p(1:n/2);

Y = p2(492:574);        % The range from 12 to 14 Hz.
I = trapz(Y)*(50/2048);
